/**
 *  清空对象中value值
 */
export async function clearValue(data: any) {
  for (let key in data) {
    data[key] = "";
  }
  return data;
}
/**
 *  去重数组
 */
export async function wipeOffRepetition(arr: any) {
  return [...new Set(arr)];
}
/**
 *  解决 for in 在typeScript 中的问题
 */
export function isValidKey(
  key: string | number,
  object: object
): key is keyof typeof object {
  return key in object;
}
